<template>
  <div class="">
    <span>名称</span>
    <el-input v-model="input" placeholder="属性名称"></el-input>
    <span>分类</span>
    <el-button type="primary"  @click="checkout">查询</el-button>
    <el-button type="primary">添加</el-button>
    <el-table :data="Brand" border show-overflow-tooltip style="width: 100" size="medium">
      <el-table-column prop="id" label="ID" width="220"> </el-table-column>
       <el-table-column prop="name" label="品牌名称" width="220"> </el-table-column>
        <el-table-column prop="floor_price" label="最低价" width="220"> </el-table-column>
         <el-table-column prop="is_new" label="新品" width="220"> 
             <template slot-scope="scope">
            {{scope.row.is_new === 1 ? '是' : '否'}}
          </template>
         </el-table-column>
          <el-table-column prop="is_show" label="显示" width="220"><template slot-scope="scope">
            {{scope.row.is_show === 1 ? '是' : '否'}}
          </template> </el-table-column>
            <el-table-column label="操作" width="220"><el-button type="primary">编辑</el-button> </el-table-column>
    </el-table>
  </div>
</template>
 
<script>
import {Brand} from '../../../../../request/api'
export default {
  data() {
    return {
        input:"",
        Brand:[]
    };
  },
  created(){
      Brand().then(res=>{
         this.Brand=res.data.data
        
      })
  },
  methods:{
    checkout(){
        Brand({
          page:"1",
          name:this.input,
          size:"10"
        }).then(res=>{
         this.Brand=res.data.data
        
      })
    }
  }
};
</script>
 
<style lang = "less" scoped>
.el-input {
  padding-top: 10px;
  padding-bottom: 10px;
  width: 188px;
  height: 33px;
  box-sizing: border-box;
  padding:10px ;
}
.el-button{
    margin-left: 10px;
}
</style>